package com.pk.platform.business.core.dao.impl;

import java.util.List;
import java.util.Map;

import com.pk.platform.business.core.dao.IListTipDao;


public class ListTipDaoImpl extends GenericDaoImpl implements IListTipDao {

    public List<Map<String, Object>> queryTip(String table, String field, String where, String value, String itemCount) {
    	String limit = "";
        if(itemCount != null && !"0".equals(itemCount))
        {
        	limit = " limit 0," + itemCount + " ";
        }
        StringBuffer sql = new StringBuffer();
        sql.append("select ").append(field).append(" from ").append(table).append(" where ").append(field).append(" like ");
        sql.append("'").append(value).append("%'").append(where).append(" order by ").append(field).append(limit);
        return this.getSjt().queryForList(sql.toString());
    }

}
